﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ciripescu_WebRole.BL;

namespace Ciripescu_WebRole.Admin
{
    public partial class inittables : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            // autentificare super tare imposibil de spart gen NASA!
            if (txtPass.Text == "tudor")
            {
                FirstRequestInitialization.ApplicationStartUponFirstRequest();
            }

            try
            {
                CBlobStorage b = new CBlobStorage();
                b.SaveImage(Properties.Settings.Default.DefaultPictureId,
                            FileUpload1.PostedFile.ContentType,
                            FileUpload1.FileBytes);
            }
            catch (Exception ex)
            {
                divError.InnerHtml = ex.ToString();
            }
            divError.InnerHtml = "OK";
        }
    }
}
